import requests
import  json
import random
import time
import bs4

iplist=[] #提ip

with open("ipdaili.txt")as f:
    iplist=f.readlines()

def getip():
    proxy=iplist[random.randint(0,len(iplist)-1)]
    proxy=proxy.replace("\n","")
    proxies={
        'http':'http://'+str(proxy)
    }
    return  proxies
headers=[
    {
        'User-Agent':""
    }
]
for i in range(12,200,1):
    time.sleep(2)
    r=requests.get(''+str(i*20)+'&limit=20',proxies=getip(),headers=random.choice(headers))
    result=json.loads(r.text)


with open("ur.txt", 'a', encoding='utf-8')as f:
    f.write(str(result)+'\n')